package com.liujit.bms.admin.controller;

import com.liujit.bms.admin.domain.query.BlogArticleCollectionQuery;
import com.liujit.bms.admin.domain.result.BlogArticleCollectionResult;
import com.liujit.bms.admin.service.BlogArticleCollectionService;
import com.liujit.common.domain.result.PageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 博客文章收藏管理接口
 * @Author liujun
 * @Date 2021-07-19 17:26:26
 */
@RequiredArgsConstructor
@Api(tags = "博客文章收藏管理接口")
@RestController
@RequestMapping("/blog/article/collection")
public class BlogArticleCollectionController {

    private final BlogArticleCollectionService blogArticleCollectionService;

    @ApiOperation(value = "分页查询", notes = "根据博客会员收藏分页查询条件，分页查询博客会员收藏列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "query", value = "博客会员收藏分页查询条件", dataType = "BlogMemberCollectionQuery", dataTypeClass = BlogArticleCollectionQuery.class, paramType = "query") })
    @GetMapping("/getPage")
    public PageBean<BlogArticleCollectionResult> getPage(BlogArticleCollectionQuery query) {
        return blogArticleCollectionService.getPage(query);
    }
}
